package com.mvc.framwork.pojo;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

/**
 * @Author: xiaoqiang
 * @Description:
 * @Date: 2021/6/17
 * @Version: 1.0
 */
public class Handler {
    private Object controller; //controller类对象

    private Method method;

    private Pattern pattern;

    /**
     * key:参数名，value:第几个参数
     */
    private Map<String,Integer> param =new HashMap<>();

    public Handler() {
    }

    public Handler(Object controller, Method method, Pattern pattern, Map<String, Integer> param) {
        this.controller = controller;
        this.method = method;
        this.pattern = pattern;
        this.param = param;
    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public void setPattern(Pattern pattern) {
        this.pattern = pattern;
    }

    public Map<String, Integer> getParam() {
        return param;
    }

    public void setParam(Map<String, Integer> param) {
        this.param = param;
    }
}
